The information in this chapter applies only if your system supports the _Gestalt trap: that is, if it is system 6.0.4 or later.
Apollo registers a new Gestalt selector of value 'ApoL'. The information returned from this selector is a handle to an instance of the following structure (described in C):
struct
{ long version; // same as first 4 bytes of 'vers' resource
short attr; // attribute bits: see below
Boolean (*Control)(Boolean) // control function
};
Only the bottom bit of attr is defined: it is set to 1 if Apollo is enabled and 0 if it is disabled (obviously, if Apollo is not loaded, Gestalt will return gestaltUndefSelectorErr). Other bits are set to zero.
Control takes a single Boolean argument: if it is false, Apollo is disabled (but only until next restart) and if true, Apollo is re-enabled. When disabled, Apollo will still draw its menu bar icons (if any), but it will not respond to mouse clicks or key commands.
If you disable Apollo using the Control function, the only way to re-enable it is to restart or to use the Control function again.
The handle is created in the current heap and it is the caller’s responsibility to dispose of it.